#ifndef PSD_CHART_PAINTER_H
#define PSD_CHART_PAINTER_H

#include <QWidget>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QtCharts/QLogValueAxis>
#include <QtCharts/QValueAxis>

#include "display_shared_settings.h"

QT_CHARTS_USE_NAMESPACE

class PSD_Chart_Painter : public QChartView
{
    Q_OBJECT
public:
    explicit PSD_Chart_Painter(QChartView *parent = nullptr);
    void update_nRB(int nRB);
    void update_PSD_Chart(double *psd_data, int nRB, int data_num);

signals:

public slots:
    void adjustViewArea();
private:
    QLineSeries *series;
    QChart *chart;
    QValueAxis *axisX;
    QValueAxis *axisY;
    int nRB;

    void mouseReleaseEvent(QMouseEvent *event);

};

#endif // PSD_CHART_PAINTER_H
